<form id="pagerForm" method="post" action="">
	<input type="hidden" name="pageNum" value="{$pageNum}" />
	<input type="hidden" name="numPerPage" value="{$numPerPage}" />
	<input type="hidden" name="orderField" value="{$orderField}" />
	<input type="hidden" name="orderDirection" value="{$orderDirection}" />
	<input type="hidden" name="keywords" value="{$keywords}" />
	<input type="hidden" name="sfield" value="{$sfield}" />
	<input type="hidden" name="platform" value="{$platform}" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="" method="post">
		<input type="hidden" name="m" value="{$module_name}" />
		<input type="hidden" name="a" value="{$action_name}" />
	<div class="searchBar">
		<ul class="searchContent">
			<li style="width:180px;">
				<label style="width:50px;">关键字：</label>
				<input type="text" name="keywords" value="{$keywords}" style="width:100px;"/>
			</li>
			<li style="width:60px;">
			<select name="sfield" class="combox">
				<option value="all" {if $sfied=='all'}selected="selected"{/if}>全部</option>
				<option value="user_id" {if $sfied=='user_id'}selected="selected"{/if}>账户ID</option>
				<option value="id" {if $sfied=='id'}selected="selected"{/if}>ID</option>
				<option value="mobile" {if $sfied=='mobile'}selected="selected"{/if}>手机号码</option>
				<option value="tel" {if $sfied=='tel'}selected="selected"{/if}>电话号码</option>
				<option value="realname" {if $sfied=='realname'}selected="selected"{/if}>联系人</option>
				<option value="company" {if $sfied=='company'}selected="selected"{/if}>商家名称</option>
			</select>
			<input type="hidden" name="sfield_name" value="id,user_id,mobile,tel,realname,company" />
			</li>
			<li style="width:140px;">
			    <label style="width:60px;">商户类型：</label>
				<select name="stype" class="combox">
					<option value="all" {if $stype=='all'||empty($stype)}selected="selected"{/if}>全部</option>
					<option value="1" {if $stype=='1'}selected="selected"{/if}>云购商</option>
					<option value="2" {if $stype=='2'}selected="selected"{/if}>云购店</option>
				</select>
			</li>
			<li style="width:380px;">
                <label style="width:60px;">商户区域：</label>
                <select name="province"   ref="city" refUrl="{:U('Bizbase/area')}&id={value}&level=2" class="combox">
                    <option value="all">请选择省份...</option>
                    <volist name="Area_list" id="vo">
                        {if $vo['parentid'] == 0}
                        <option value="{$vo['id']}" {if $province==$vo['id']}selected="selected"{/if}>{$vo['name']}</option>
                        {/if}
                    </volist>
                  </select>
                  <select name="city" ref="area" refUrl="{:U('Bizbase/area')}&id={value}&level=3" id="city" class="combox">
                    <option value="all">请选择城市...</option>
                    {if !empty($city)}
                    <volist name="Area_list" id="vo">
                        {if $vo['parentid'] == $province}
                        <option value="{$vo['id']}" {if $city==$vo['id']}selected="selected"{/if}>{$vo['name']}</option>
                        {/if}
                    </volist>
                    {/if}
                  </select>
                  <select name="area" id="area" class="combox">
                    <option value="all">请选择区域...</option>
                    {if !empty($area)}
                    <volist name="Area_list" id="vo">
                        {if $vo['parentid'] == $city}
                        <option value="{$vo['id']}" {if $area==$vo['id']}selected="selected"{/if}>{$vo['name']}</option>
                        {/if}
                    </volist>
                    {/if}
                  </select>
            </li>
            <li style="width:310px;">
                <label style="width:60px;">商户状态：</label>
                <select name="pay_status" class="combox">
                    <option value="all" {if $pay_status=='all'||empty($pay_status)}selected="selected"{/if}>请选择...</option>
                    <option value="-1" {if $pay_status=='-1'}selected="selected"{/if}>未付款</option>
                    <option value="1" {if $pay_status=='1'}selected="selected"{/if}>线上付款失败</option>
                    <option value="2" {if $pay_status=='2'}selected="selected"{/if}>线下付款失败</option>
                    <option value="3" {if $pay_status=='3'}selected="selected"{/if}>付款中</option>
                    <option value="4" {if $pay_status=='4'}selected="selected"{/if}>线上已付款</option>
                    <option value="5" {if $pay_status=='5'}selected="selected"{/if}>线下已付款</option>
                </select>
                <select name="status" class="combox">
                    <option value="all" {if $status=='all'||empty($status)}selected="selected"{/if}>请选择...</option>
                    <option value="-1" {if $status=='-1'}selected="selected"{/if}>未审核</option>
                    <option value="1" {if $status=='1'}selected="selected"{/if}>审核未通过</option>
                    <option value="2" {if $status=='2'}selected="selected"{/if}>审核通过</option>
                </select>
                <select name="isclose" class="combox">
                    <option value="all" {if $isclose=='all'||empty($isclose)}selected="selected"{/if}>请选择...</option>
                    <option value="-1" {if $isclose=='-1'}selected="selected"{/if}>未开通</option>
                    <option value="1" {if $isclose=='1'}selected="selected"{/if}>关闭帐户</option>
                    <option value="2" {if $isclose=='2'}selected="selected"{/if}>开通帐户</option>
                </select>
            </li>
			<div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
		</ul>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="{:U('Bizbase/cloudclientadd')}" target="dialog" width="680" height="650" rel="Bizbase_cloudclientadd"><span>注册商户</span></a></li>
			<li><a class="edit" href="{:U('Bizbase/edit')}&id={sid_dv}" target="dialog" width="600" height="350" warn="请选择一条信息"><span>修改信息</span></a></li>
			<li><a class="icon" width="830" height="380" href="{:U('Bizbase/detail')}&id={sid_dv}" target="dialog" warn="请选择一条信息"><span>查看信息</span></a></li>
			<!--<li><a class="icon" href="javascript:$.printBox('user_list')"><span>打印</span></a></li>-->
		</ul>
	</div>
	<div id="user_list">
	<table class="table" layoutH="110">
		<thead>
			<tr>
				<th width="30"><input type="checkbox" group="ids[]" class="checkboxCtrl"></th>
				<th width="50" orderField="id" {if $orderField=='id'}class="{$orderDirection}"{/if}>ID</th>
				<th width="100" orderField="user_id" {if $orderField=='user_id'}class="{$orderDirection}"{/if}>帐户ID(账户名)</th>
				<th width="60" orderField="stype" {if $orderField=='stype'}class="{$orderDirection}"{/if}>类型</th>
				<th width="120" orderField="realname" {if $orderField=='realname'}class="{$orderDirection}"{/if}>商家名称(联系人)</th>	
				<th width="150" orderField="province" {if $orderField=='province'}class="{$orderDirection}"{/if}>所属区域</th>										
				<th width="200" orderField="mobile" {if $orderField=='mobile'}class="{$orderDirection}"{/if}>电话/手机</th>
				<th width="150" orderField="starttime" {if $orderField=='starttime'}class="{$orderDirection}"{/if}>合约开始</th>
				<th width="150" orderField="endtime" {if $orderField=='endtime'}class="{$orderDirection}"{/if}>合约结束</th>
				<th width="240">状态</th>
				<th width="120">编辑</th>
			</tr>
		</thead>
		<tbody>
<volist name="list" id="vo">
			<tr target="sid_dv" rel="{$vo['id']}">
				<td><input name="ids[]" value="{$vo['id']}" type="checkbox"></td>
				<td>{$vo['id']}</td>
				<td><a title="查看" target="dialog" style="color:blue;" width="630" height="590" rel="User_detail_{$vo['user_id']}" href="{:U('User/detail',array('id'=>$vo['user_id']))}">{$vo['user_id']}({$vo['username']})</a></td>
				<td>{$biz_stype[$vo['stype']]}</td>
				<td>{if empty($vo[company])}{$vo[realname]}{else}{$vo[company]}({$vo[realname]}){/if}</td>
				<td><a title="{$vo[address]}">{$Area[$vo[province]]['name']}{if $vo[city]!=0}|{$Area[$vo[city]]['name']}{/if}{if $vo[area]!=0}|{$Area[$vo[area]]['name']}{/if}</a></td>
				<td>{if empty($vo[tel])}{$vo[mobile]}{else}{$vo[tel]}({$vo[mobile]}){/if}</td>
				<td>{$vo[starttime] ? $vo[starttime]|date='Y-m-d H:m:s',###:''}</td>
				<td>{$vo[endtime] ? $vo[endtime]|date='Y-m-d H:m:s',###:''}</td>
				<td>{$biz_pay_status[$vo[pay_status]]}|{$biz_status[$vo[status]]}|{$biz_isclose[$vo[isclose]]}</td>
				<td><a title="编辑" target="dialog" width="600" height="350"  rel="Bizbase_edit_{$vo['id']}" href="{:U('Bizbase/edit',array('id'=>$vo['id']))}" class="btnEdit">编辑</a><a title="查看" target="dialog" width="830" height="380" rel="Bizbase_detail_{$vo['id']}" href="{:U('Bizbase/detail',array('id'=>$vo['id']))}" class="btnInfo">查看</a></td>
			</tr>
</volist>
		</tbody>
	</table>
	</div>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20" {if $numPerPage==20}selected="selected"{/if}>20</option>
				<option value="50" {if $numPerPage==50}selected="selected"{/if}>50</option>
				<option value="66" {if $numPerPage==66}selected="selected"{/if}>66</option>
				<option value="100" {if $numPerPage==100}selected="selected"{/if}>100</option>
				<option value="200" {if $numPerPage==200}selected="selected"{/if}>200</option>
			</select>
			<span>条，共{$totalCount}条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="10" currentPage="{$pageNum}"></div>
	</div>
</div>
